package co.fitstart.weapp.api.service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import co.fitstart.entity.course.round.CourseRound;
import co.fitstart.entity.course.schedule.CourseSchedule;
import co.fitstart.entity.principal.Principal;
import co.fitstart.entity.site.RoomType;
import co.fitstart.entity.site.Site;
import co.fitstart.entity.user.Student;

/**
 * 
 * @author haiyan_xiao
 *
 */
public interface CourseAppointService {

    /**
     * 
     * @param courseRound
     * @return
     */
    public List<String> listAvailableDay(CourseRound courseRound);

    /**
     * 
     * @param site
     * @return
     */
    public Map<String, Map<String, List<Site>>> listAvailableSite(Site site);

    /**
     * 
     * @param student
     * @param courseRound
     */
    public void validate(Student student, CourseRound courseRound);
    
    /**
     * 
     * @param student
     * @param courseRound
     * @param courseSchedule
     * @param occurDate
     */
    public void validate(Student student, CourseRound courseRound, CourseSchedule courseSchedule, Date occurDate);

    /**
     * 
     * @param student
     * @param courseRound
     * @param courseSchedule
     * @param site
     * @param occurDate
     * @param occurHour
     */
    public void validate(Student student, CourseRound courseRound, CourseSchedule courseSchedule, Site site, Date occurDate, String occurHour);

    /**
     * 
     * @param courseRound
     * @param courseSchedule
     * @param selectedSite
     * @return
     */
    public Site getDefaultSite(CourseRound courseRound, Site selectedSite);

    /**
     * 列出各时间段各区域可用数目
     * @param courseRound
     * @param day
     * @param site
     * @return
     */
    public List<Map<String, Object>> listRemain(CourseRound courseRound, Date day, Site site);

    /**
     * 
     * @param courseRound
     * @param day
     * @param site
     * @param courseSchedule
     * @return
     */
    public List<Map<String, Object>> listRemain(CourseRound courseRound, Date day, Site site, CourseSchedule courseSchedule);

    /**
     * 
     * @param courseRound
     * @param site
     * @param occurDate
     * @param occurHour
     * @return
     */
    public Map<String, Object> listCoach(CourseRound courseRound, Site site, Date occurDate, String occurHour);

    /**
     * 
     * @param courseRound
     * @param site
     * @param occurDate
     * @param occurHour
     * @param courseSchedule
     * @return
     */
    public Map<String, Object> listCoach(CourseRound courseRound, Site site, Date occurDate, String occurHour, CourseSchedule courseSchedule);

    /**
     * 
     * @param courseRound
     * @param site
     * @param occurDate
     * @param coach
     * @return
     */
    public List<Map<String, Object>> listRemainByCoach(CourseRound courseRound, Site site, Date occurDate, Principal coach);

    /**
     * 
     * @param courseRound
     * @param site
     * @param occurDate
     * @param coach
     * @param courseSchedule
     * @return
     */
    public List<Map<String, Object>> listRemainByCoach(CourseRound courseRound, Site site, Date occurDate, Principal coach, CourseSchedule courseSchedule);

    /**
     * 
     * @param courseRound
     * @param site
     * @param coach
     * @param occurDate
     * @param occurHour
     */
    public void appointSchedule(CourseRound courseRound, Site site, Principal coach, Date occurDate, String occurHour);

    /**
     * 
     * @param courseRound
     * @param site
     * @param coach
     * @param occurDate
     * @param occurHour
     * @param roomType
     */
    public void appointSchedule(CourseRound courseRound, Site site, Principal coach, Date occurDate, String occurHour, RoomType roomType);

    /**
     * 
     * @param courseRound
     * @param site
     * @param coach
     * @param occurDate
     * @param occurHour
     * @param courseSchedule
     */
    public void changeSchedule(CourseRound courseRound, Site site, Principal coach, Date occurDate, String occurHour, CourseSchedule courseSchedule);

    /**
     * 
     * @param courseRound
     * @param site
     * @param coach
     * @param occurDate
     * @param occurHour
     * @param roomType
     * @param courseSchedule
     */
    public void changeSchedule(CourseRound courseRound, Site site, Principal coach, Date occurDate, String occurHour, RoomType roomType, CourseSchedule courseSchedule);

    /**
     * 
     * @param courseRound
     * @param site
     * @param coach
     * @param occurDate
     * @param occurHour
     * @param roomType
     */
    public void validateAppointment(CourseRound courseRound, Site site, Principal coach, Date occurDate, String occurHour, RoomType roomType);

    /**
     * 
     * @param courseRound
     * @param site
     * @param coach
     * @param occurDate
     * @param occurHour
     * @param roomType
     * @param courseSchedule
     */
    public void validateAppointment(CourseRound courseRound, Site site, Principal coach, Date occurDate, String occurHour, RoomType roomType, CourseSchedule courseSchedule);

    /**
     * 
     * @param student
     * @param courseSchedule
     */
    public void validateCancel(Student student, CourseSchedule courseSchedule);

    /**
     * 
     * @param courseSchedule
     */
    public void cancelSchedule(CourseSchedule courseSchedule);
}
